//asdfasdfasdfzx` => `asdfasdfasdf

let str = 'asdfasdfasdfzx'
function getstrless(str){
    let strArr = str.split('')
    let obj ={}
    strArr.forEach(function(item){
        if(obj[item]){
            obj[item]++
        }else{
            obj[item]=1
        }
    })
    console.log(obj)
    let numArr = []
    for(let item1 in obj){
      numArr.push(obj[item1])
    }
    numArr.sort(function(a,b){
        return a-b
    })
    console.log(numArr)
    let minNum = numArr[0]
    let newstr =''
    strArr.forEach(function(item){
        if(obj[item] !== minNum){
            newstr +=item
        }
    })
    return newstr
}
let newstr = getstrless(str)

console.log(newstr)